Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
struct System.​Runtime.​CompilerServices.​ConfiguredCancelableAsyncEnumerable<​T>
Assembly: System.Runtime
Provides an awaitable async enumerable that enables cancelable iteration and configured awaits.
Methods
public
ConfiguredCancelableAsyncEnumerable<​T>
ConfigureAwait​(bool continueOnCapturedContext)
Configures how awaits on the tasks returned from an async iteration will be performed.
Returns The configured enumerable.
continueOnCapturedContext
Whether to capture and marshal back to the current context.
public
Enumerator<​T>
GetAsyncEnumerator​()
Returns an enumerator that iterates asynchronously through collections that enables cancelable iteration and configured awaits.
Returns An enumerator for the <see cref="T:System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable`1" /> class.
public
ConfiguredCancelableAsyncEnumerable<​T>
WithCancellation​(Threading.​CancellationToken cancellationToken)
Sets the <see cref="T:System.Threading.CancellationToken" /> to be passed to <see cref="M:System.Collections.Generic.IAsyncEnumerable`1.GetAsyncEnumerator(System.Threading.CancellationToken)" /> when iterating.
Returns The configured enumerable.
cancellationToken
The <see cref="T:System.Threading.CancellationToken" /> to use.
public
bool
Equals​(object obj)
Inherited from ValueType
Indicates whether this instance and a specified object are equal.
Returns <see langword="true" /> if <paramref name="obj" /> and this instance are the same type and represent the same value; otherwise, <see langword="false" /> .
obj
The object to compare with the current instance.
public
int
GetHashCode​()
Inherited from ValueType
Returns the hash code for this instance.
Returns A 32-bit signed integer that is the hash code for this instance.
public
string
ToString​()
Inherited from ValueType
Returns the fully qualified type name of this instance.
Returns The fully qualified type name.
protected
void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public
Type
GetType​()
Inherited from object
Gets the <see cref="T:System.Type" /> of the current instance.
Returns The exact runtime type of the current instance.
protected
object
MemberwiseClone​()
Inherited from object
Creates a shallow copy of the current <see cref="T:System.Object" /> .
Returns A shallow copy of the current <see cref="T:System.Object" /> .